
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpImGroup.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpImUsermsgForm"
 */
public class CcpImOffmsgForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _cioGuid = null;
   private java.lang.String _cioUser = null;
   private java.lang.String _cioSender = null;
   private java.lang.String _cioData = null;
   private java.lang.String _cioDate = null;
   private java.lang.String _cioType = null;
   private java.lang.String _cioResv1 = null;
   private java.lang.String _cioResv2 = null;
   private java.lang.String _cioResv3 = null;

   /**
    * Standard constructor.
    */
   public CcpImOffmsgForm() {
   }

   /**
    * Returns the cioGuid
    *
    * @return the cioGuid
    */
   public java.lang.String getCioGuid() {
      return _cioGuid;
   }

   /**
    * Sets the cioGuid
    *
    * @param cioGuid the new cioGuid value
    */
   public void setCioGuid(java.lang.String cioGuid) {
      _cioGuid = cioGuid;
   }
   /**
    * Returns the cioUser
    *
    * @return the cioUser
    */
   public java.lang.String getCioUser() {
      return _cioUser;
   }

   /**
    * Sets the cioUser
    *
    * @param cioUser the new cioUser value
    */
   public void setCioUser(java.lang.String cioUser) {
	   _cioUser = cioUser;
   }
   /**
    * Returns the cioSender
    *
    * @return the cioSender
    */
   public java.lang.String getCioSender() {
      return _cioSender;
   }

   /**
    * Sets the cioSender
    *
    * @param cioSender the new cioSender value
    */
   public void setCioSender(java.lang.String cioSender) {
	   _cioSender = cioSender;
   }
   /**
    * Returns the cioData
    *
    * @return the cioData
    */
   public java.lang.String getCioData() {
      return _cioData;
   }

   /**
    * Sets the cioData
    *
    * @param cioData the new cioData value
    */
   public void setCioData(java.lang.String cioData) {
      _cioData = cioData;
   }
   /**
    * Returns the cioDate
    *
    * @return the cioDate
    */
   public java.lang.String getCioDate() {
      return _cioDate;
   }

   /**
    * Sets the cioDate
    *
    * @param cioDate the new cioDate value
    */
   public void setCioDate(java.lang.String cioDate) {
      _cioDate = cioDate;
   }
   /**
    * Returns the _cioType
    *
    * @return the _cioType
    */
   public java.lang.String getCioType() {
      return _cioType;
   }

   /**
    * Sets the _cioType
    *
    * @param _cioType the new _cioType value
    */
   public void setCioType(java.lang.String cioType) {
	   _cioType = cioType;
   }
   /**
    * Returns the cioResv1
    *
    * @return the cioResv1
    */
   public java.lang.String getCioResv1() {
      return _cioResv1;
   }

   /**
    * Sets the cioResv1
    *
    * @param cioResv1 the new cioResv1 value
    */
   public void setCioResv1(java.lang.String cioResv1) {
      _cioResv1 = cioResv1;
   }
   /**
    * Returns the cioResv2
    *
    * @return the cioResv2
    */
   public java.lang.String getCioResv2() {
      return _cioResv2;
   }

   /**
    * Sets the cioResv2
    *
    * @param cioResv2 the new cioResv2 value
    */
   public void setCioResv2(java.lang.String cioResv2) {
      _cioResv2 = cioResv2;
   }
   /**
    * Returns the cioResv3
    *
    * @return the cioResv3
    */
   public java.lang.String getCioResv3() {
      return _cioResv3;
   }

   /**
    * Sets the cioResv3
    *
    * @param cioResv3 the new cioResv3 value
    */
   public void setCioResv3(java.lang.String cioResv3) {
      _cioResv3 = cioResv3;
   }

   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getCioGuid() == null) {
         errors.add("cioGuid", new ActionError("error.cioGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
